package com.iebrowser;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;

public class OptionsWidget extends Composite {
	private Group grpHomePage;
	private Text text;
	private Button saveBtn;
	private Button cancelBtn;

	/**
	 * Create the composite.
	 * @param parent
	 * @param style
	 */
	public OptionsWidget(Composite parent, int style) {
		super(parent, style);
		setLayout(new GridLayout(2, false));
		
		saveBtn = new Button(this, SWT.NONE);
		saveBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		saveBtn.setText("Save");
		
		cancelBtn = new Button(this, SWT.NONE);
		cancelBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		cancelBtn.setText("Cancel");
		
		grpHomePage = new Group(this, SWT.NONE);
		GridData gd_grpHomePage = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
		gd_grpHomePage.widthHint = 229;
		grpHomePage.setLayoutData(gd_grpHomePage);
		grpHomePage.setText("Home Page");
		grpHomePage.setLayout(new GridLayout(1, false));
		
		text = new Text(grpHomePage, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
		text.setToolTipText("Home page address");
		text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		new Label(this, SWT.NONE);

	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}
}
